package com.ruoyi.system.controller;

import com.aliyun.dingtalkconference_1_0.models.QueryOrgConferenceListResponse;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.system.domain.FaceSetInfo;
import com.ruoyi.system.service.IMeetService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 会议系统Controller
 *
 * @author zs
 * @date 2025-05-05
 */
@RestController
@RequestMapping("/system/meet")
public class MeetController {

    @Autowired
    private IMeetService meetService;

    /**
     * 获取部门列表
     */
    @GetMapping("/queryDeptList")
    public AjaxResult queryDeptList(Long deptId) throws Exception {
        return AjaxResult.success(meetService.queryDeptList(deptId));
    }

    /**
     * 根据unionId获取日程列表
     */
    @GetMapping("/queryScheduleList")
    public AjaxResult queryScheduleList(String unionId) throws Exception {
        return AjaxResult.success(meetService.queryScheduleList(unionId));
    }
    /**
     * 根据部门ID 获取部门下的人员信息列表
     */
    @GetMapping("/queryDeptUserList")
    public AjaxResult queryDeptUserList(Long deptId, Long cursor, Long size) throws Exception {
        return AjaxResult.success(meetService.queryDeptUserList(deptId, cursor, size));
    }

    /**
     * 查询系统会议系统列表
     */
    @GetMapping("/queryConferenceInfoWithOptions")
    public AjaxResult queryConferenceInfoWithOptions() throws Exception {
        return AjaxResult.success(meetService.queryConferenceInfoWithOptions());
    }

    /**
     * 企业会议系统列表
     */
    @GetMapping("/queryOrgConferenceListWithOptions")
    public AjaxResult queryOrgConferenceListWithOptions() throws Exception {
        QueryOrgConferenceListResponse response = meetService.queryOrgConferenceListWithOptions();
        return AjaxResult.success(response);
    }


}
